Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow $sync to be called manually #52

Merged
merged 3 commits into from
Oct 16, 2023

Conversation

zknill
Copy link
Collaborator

@zknill zknill commented Oct 13, 2023

Expose the sync function that can be called manually to resync the model. On resync the model will go into the preparing state, and then the ready state when the sync is complete.

Add tests.

@zknill zknill requested a review from mschristensen October 13, 2023 11:19
@zknill zknill force-pushed the feature/COL-40-replace-update-function-merge-function branch 2 times, most recently from 99e6914 to 2f9adbd Compare October 13, 2023 11:29
Base automatically changed from feature/COL-40-replace-update-function-merge-function to main October 16, 2023 11:15
Replace the per-channel-per-event update function mapping with a single
merge function. This makes the UpdatesRegistry redundant, as we don't
need a class to hold the old mapping:  "channel -> eventName -> function"

Update the tests, and rename some update terminology to merge.

Also:
- accept the channel name as a constructor argument to the Model.
@zknill zknill force-pushed the feature/COL-42-allow-sync-manually-called branch from 2c87e88 to 5bc8b45 Compare October 16, 2023 11:20
Expose the sync function that can be called manually to resync the
model. On resync the model will go into the preparing state, and then
the ready state when the sync is complete.

Add tests.
@zknill zknill force-pushed the feature/COL-42-allow-sync-manually-called branch from 5bc8b45 to 51c7870 Compare October 16, 2023 12:36
Copy link
Collaborator

@mschristensen mschristensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments, otherwise LGTM

src/Model.discontinuity.test.ts Show resolved Hide resolved
src/Model.ts Outdated Show resolved Hide resolved
src/Model.ts Outdated Show resolved Hide resolved
src/Model.test.ts Show resolved Hide resolved
src/Model.test.ts Show resolved Hide resolved
@zknill zknill force-pushed the feature/COL-42-allow-sync-manually-called branch from 402b6cb to c9a56b1 Compare October 16, 2023 12:50
@zknill zknill requested a review from mschristensen October 16, 2023 12:50
@zknill zknill merged commit 621e09f into main Oct 16, 2023
5 checks passed
@zknill zknill deleted the feature/COL-42-allow-sync-manually-called branch October 16, 2023 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants